<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGoodsesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('goodses', function (Blueprint $table) {
            $table->increments('id');
            $table->string("name")->default("")->comment("商品名");
            $table->integer("cate_id")->default(0)->comment("分类id");
            $table->string("img")->default("")->comment("商品主图");
            $table->decimal("price",9,2)->default(0.00)->comment("商品价格");
            $table->integer("is_on")->default(0)->comment("是否上架 0不上架 1上架");
            $table->integer("is_hot")->default(0)->comment("是否热销 0不热销 1热销");
            $table->integer("is_new")->default(0)->comment("是否新品 0 不是 1是");
            $table->integer("is_best")->default(0)->comment("是否精品 0不是 1是");
            $table->text("desc")->comment("详细描述");
            $table->text("intro")->comment("图文详情");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('goodses');
    }
}
